﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Collections.ObjectModel;
using SATF.DB;

namespace SATF.BI
{
    public class BICaseFiles : BaseCollection
    {
        public BICaseFiles()
        {

        }

      /*  private IList<BICaseFile> m_children;
        public IList<BICaseFile> Children
        {
            get
            {
                if (m_children == null)
                {
                    m_children = new List<BICaseFile>();
                }
                return m_children;
            }
            set { m_children = value; }
        }*/

        public BICaseFiles(System.Data.DataTable table)
            : base(table)
        {

        }

        public override void Fill(System.Data.DataTable table)
        {

            foreach (DataRow row in table.Rows)
            {
                BICaseFile machine = new BICaseFile(row);
                this.Add(machine);
                this.Children.Add(machine);
            }
        }

        public ObservableCollection<BICaseFile> GetObservableCollection()
        {
            ObservableCollection<BICaseFile> obCollection = new ObservableCollection<BICaseFile>();
            foreach (BICaseFile item in this)
            {
                obCollection.Add(item);
            }
            return obCollection;
        }

        public override void Update()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public override void Refresh()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        #region 查询方法


        #endregion
    }
}
